package com.ruoyi.module.MemberInvestment.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.module.MemberInvestment.mapper.MemberInvestmentMapper;
import com.ruoyi.module.MemberInvestment.domain.MemberInvestment;
import com.ruoyi.module.MemberInvestment.service.IMemberInvestmentService;

/**
 * 协会招商专栏Service业务层处理
 * 
 * @author yqq
 * @date 2024-07-17
 */
@Service
public class MemberInvestmentServiceImpl implements IMemberInvestmentService 
{
    @Autowired
    private MemberInvestmentMapper memberInvestmentMapper;

    /**
     * 查询协会招商专栏
     * 
     * @param investmentId 协会招商专栏主键
     * @return 协会招商专栏
     */
    @Override
    public MemberInvestment selectMemberInvestmentByInvestmentId(Long investmentId)
    {
        return memberInvestmentMapper.selectMemberInvestmentByInvestmentId(investmentId);
    }

    /**
     * 查询协会招商专栏列表
     * 
     * @param memberInvestment 协会招商专栏
     * @return 协会招商专栏
     */
    @Override
    public List<MemberInvestment> selectMemberInvestmentList(MemberInvestment memberInvestment)
    {
        return memberInvestmentMapper.selectMemberInvestmentList(memberInvestment);
    }

    /**
     * 新增协会招商专栏
     * 
     * @param memberInvestment 协会招商专栏
     * @return 结果
     */
    @Override
    public int insertMemberInvestment(MemberInvestment memberInvestment)
    {
        memberInvestment.setCreateTime(DateUtils.getNowDate());
        return memberInvestmentMapper.insertMemberInvestment(memberInvestment);
    }

    /**
     * 修改协会招商专栏
     * 
     * @param memberInvestment 协会招商专栏
     * @return 结果
     */
    @Override
    public int updateMemberInvestment(MemberInvestment memberInvestment)
    {
        memberInvestment.setUpdateTime(DateUtils.getNowDate());
        return memberInvestmentMapper.updateMemberInvestment(memberInvestment);
    }

    /**
     * 批量删除协会招商专栏
     * 
     * @param investmentIds 需要删除的协会招商专栏主键
     * @return 结果
     */
    @Override
    public int deleteMemberInvestmentByInvestmentIds(Long[] investmentIds)
    {
        return memberInvestmentMapper.deleteMemberInvestmentByInvestmentIds(investmentIds);
    }

    /**
     * 删除协会招商专栏信息
     * 
     * @param investmentId 协会招商专栏主键
     * @return 结果
     */
    @Override
    public int deleteMemberInvestmentByInvestmentId(Long investmentId)
    {
        return memberInvestmentMapper.deleteMemberInvestmentByInvestmentId(investmentId);
    }
}
